<%-- 
    Documento   : admin_login
    Creado el   : 21-nov-2007, 18:02:56
    Autor       : Solware
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.Date, java.util.Vector, CapaLogica.*, FachadaInterfaz.Receptor" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <link rel="stylesheet" href="images/style.css" type="text/css" />
        <title>Bienvenido a SAST - Login</title>
        <style type="text/css">
            <!--
                .Estilo9 {
                        color: #FFFFFF;
                        font-size: 36pt;
                        font-weight: bold;
                }
                .Estilo10 {color: #FFFFFF; font-size: 14pt; font-weight: bold; }
                .Estilo11 {
                        color: #FFFFFF;
                        font-size: 7pt;
                        font-weight: bold;
                }
            -->
        </style>
    </head>
    <body>
        <div class="content">
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <table width="640" border="0" align="center">
                <tr>
                    <td><div align="left"><%= new Date() %></div></td>
                </tr>
                <tr>
                    <td width="378" bgcolor="#0099CC">
                        <blockquote>
                            <p class="Estilo9"><br />
                                SAST<br />
                            </p>
                            <p class="Estilo10"><br />
                                v1.0
                            </p>
                            <p class="Estilo10">&nbsp;</p>
                            <p class="Estilo10">&nbsp;</p>
                            <p class="Estilo10">&nbsp;</p>
                            <p class="Estilo10">&nbsp;</p>
                            <p class="Estilo10">[ M&oacute;dulo de administraci&oacute;n ]</p>
                            <p class="Estilo10">&nbsp;</p>
                            <p class="Estilo10">&nbsp;</p>
                            <p class="Estilo10">&nbsp;</p>
                            <p class="Estilo10">&nbsp;</p>
                            <p class="Estilo10">&nbsp;</p>
                            <p class="Estilo10">&nbsp;</p>
                            <p class="Estilo11">Sistema de Administraci&oacute;n de Servicios Telem&aacute;ticos.</p>
                    </blockquote></td>
                    <td width="252" bgcolor="#EEEEEE">
                        <table width="220" border="0" align="center" cellpadding="2" cellspacing="2">
                            <% UsuarioServidor usr = (UsuarioServidor) session.getAttribute("usr_logged");
                            if (usr == null ) {
                            %>                            
                            <form id="form1" method="POST" action="Receptor">
                            <tr>
                                <td width="52">Login:&nbsp;</td>
                                <td width="168" colspan="2"><input name="usuario" type="text" id="usuario" size="25" /></td>
                            </tr>
                            <tr>
                                <td>Password:&nbsp;</td>
                                <td colspan="2"><input name="pass" type="password" id="pass" size="25" /></td>
                            </tr>
                            <tr>
                                <td colspan="3">&nbsp;</td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td><div align="right">
                                <input name="button2" type="submit" class="submit" id="button2" value="Entrar" />
                                </div>
                                </td>
                                <td><div align="right">
                                <input name="button" type="reset" class="submit" id="button" value="Limpiar" />
                                </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                <br />
                                <% if (session.getAttribute("usr_logged") == null
                                        && session.getAttribute("error") != null) {      %>
                                <p align="center" style="padding: 10px; width: 200px; font-weight: bold; color: red; background: white;">
                                    <%   out.print(session.getAttribute("error")); %>
                                </p>
                                <% } %>
                                </td>
                            </tr>                            
                            <input id="tipo" name="tipo" type="hidden" value="admin_login" />
                            </form>
                            <%} else { %>
                            <form id="form1" method="POST" action="Receptor">
                            <div align="center">
                            <tr>
                                <p align="center" style="padding: 10px; width: 200px; font-weight: bold; color: black;">
                                    <%   out.print("Bienvenido, " + usr.getNombre()); %>
                                </p>                               
                            </tr>
                            <tr>
                                &nbsp;
                            </tr>
                            <tr>                            
                            <input name="button" id="button" type="submit" class="submit" value="Entrar" />
                            </div>
                            </tr>
                            <input id="tipo" name="tipo" type="hidden" value="entrar" />
                            </form>
                            <%}%>
                            
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td><div align="right">Direcci&oacute;n de Servicios Telem&aacute;ticos - USB</div></td>
                </tr>
            </table>
        </div>
    </body>
</html>
